package cn.dubito.seller.controller;

import cn.dubito.entity.Product;
import cn.dubito.seller.service.ProductRpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liliang
 * @description:
 * @date 2018/5/28.
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private ProductRpcService productRpcService;

    @RequestMapping("/{id}")
    public Product findOne(@PathVariable("id") String id) {
        return productRpcService.findOne(id);
    }
}
